package cn.zktr.Personnel.model.uitls;

import java.sql.Timestamp;

import cn.zktr.Personnel.model.pojos.PerPmsEmp;

public class EmpSli {
	
	//员工id
	private Integer empid;
	//姓名
	private String empname;
	//身份证
	private String idcard;
	//入职时间
	private Timestamp emptame;
	//职位
	private String position;
	//部门
	private String sector;
	//最近登录时间
	private Timestamp mintame;
	//性别
	private String sex;
	
	public EmpSli(PerPmsEmp ppe) {
		setEmpid(ppe.getEmpid());
		setEmpname(ppe.getEmpname());
		setIdcard(ppe.getEmpcard());
		setEmptame(ppe.getEmptime());
		if(ppe.getPerPmsStms().size()!=0) {
			setPosition(ppe.getPerPmsStms().get(0).getPerPmsPot().getPotzw());
			setSector(ppe.getPerPmsStms().get(0).getPerPmsDept().getDeptname());
		}
		if(ppe.getPerPmsLogins().size()!=0) {
			setMintame(ppe.getPerPmsLogins().get(0).getLogintime());
		}
		if(ppe.getPerPmsEmpdets().size()!=0) {
			setSex(ppe.getPerPmsEmpdets().get(0).getPerPmsSex().getSex());
		}
	}
	
	
	public Timestamp getEmptame() {
		return emptame;
	}
	public void setEmptame(Timestamp emptame) {
		this.emptame = emptame;
	}
	public Integer getEmpid() {
		return empid;
	}
	public void setEmpid(Integer empid) {
		this.empid = empid;
	}
	public String getIdcard() {
		return idcard;
	}
	public void setIdcard(String idcard) {
		this.idcard = idcard;
	}
	public String getEmpname() {
		return empname;
	}
	public void setEmpname(String empname) {
		this.empname = empname;
	}
	public String getPosition() {
		return position;
	}
	public void setPosition(String position) {
		this.position = position;
	}
	public String getSector() {
		return sector;
	}
	public void setSector(String sector) {
		this.sector = sector;
	}
	public Timestamp getMintame() {
		return mintame;
	}
	public void setMintame(Timestamp timestamp) {
		this.mintame = timestamp;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
}
